<!DOCTYPE html>
<html lang="Zh-cn" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script th:src="@{/jquery-3.5.1.min.js}"></script>
</head>
<body>
    <h1>数据库同步</h1>
    <button class="button" id="Auto">自动导入</button>
    <button class="button" id="Company">同步企业</button>
    <button class="button" id="Department">同步部门</button>
    <button class="button" id="Role">同步角色</button>
    <button class="button" id="User">同步用户</button>
    <button class="button" id="Folder">同步文件夹</button>
    <button class="button" id="File">同步文件</button>
    <button class="button" id="RoleData">同步角色权限</button>
    <button class="button" id="Share">同步分发记录</button>
    <button class="button" id="Default">同步分发记忆</button>
    <button class="button" id="Auth">同步权限(权限部分)</button>
    <button class="button" id="Auth2">同步权限(核对)</button>
    <button class="button" id="FileNameNoExt">同步文件名</button>
    <button class="button" id="Account">同步账号</button>
    <button class="button" id="ValidateFolder">验证文件夹</button>
    <button class="button" id="ScanFilePermission">扫描文档权限更新</button>
    <button class="button" id="ResetPassword">重置密码</button>
    <button class="button" id="BomMs">处理物料</button>
    <button class="button" id="GenOldMs">生成旧物料</button>
    <button class="button" id="ToElastic">Elastic</button>
    <button class="button" id="SmbFile">SMB</button>
    <button class="button" id="FromOld">迁移</button>
    <button class="button" id="MsLinkFile">处理订单库文件版本</button>
    <button class="button" id="MsSMBFile">同步MS在SMB上的文件</button>


    <script type="application/javascript">
        $(document).ready(function () {
            $('.button').click(function (e) {
                $.get('/sync/'+e.target.id,function (response) {
                    alert("同步"+e.target.innerText+"成功!");
                })
            });
        })
    </script>
</body>
</html>